package com.feel.mall.userservice.mapper;

import com.feel.mall.common.bean.Collect;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: 刘永钦
 * @Description:
 */
@Mapper
public interface CollectMapper {
//     添加收藏
    Integer addInfo(Collect collect);
//     删除
    Integer delInfo(Integer id);
//     根据id查询
    Collect getById(Integer id);
//     通过商品id和用户id查询
    Collect getByGoodsIdAndUserId(@Param("goodsId") Integer goodsId,@Param("userId") Integer userId);
//     查询所有
    List<Collect> getAllByCondition(Collect condition);
}
